//
//  MusicjianjieViewController.m
//  Project_B
//
//  Created by dllo on 15/12/7.
//  Copyright © 2015年 张闯. All rights reserved.
//

#import "MusicjianjieViewController.h"
#import "CalculateHeight.h"

@interface MusicjianjieViewController ()

@property (nonatomic , strong) UILabel * titles;
@property (nonatomic , strong) UILabel * nicknames;
@property (nonatomic , strong) UILabel * tagss;
@property (nonatomic , strong) UILabel * intros;
//@property (nonatomic , retain) UILabel * introRichs;
@property (nonatomic , strong) UIScrollView * intr;

@end

@implementation MusicjianjieViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.intr = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0 , self.view.frame.size.width - 20, self.view.frame.size.height)];
    self.intr.backgroundColor = [UIColor colorWithRed:(238)/255.0 green:(238)/255.0 blue:(238)/255.0 alpha:(1)];
    CGFloat h = [CalculateHeight heightWithText:self.intro fontSize:14];
    self.intr.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
    self.intr.contentSize = CGSizeMake(375, h + 200);

    [self.view addSubview:self.intr];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"iconfont-fanhui@2x"] style:UIBarButtonItemStylePlain target:self action:@selector(leftButtonAction)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
    self.navigationItem.title = self.titlea;
    
    self.titles = [[UILabel alloc] initWithFrame:CGRectMake(10, 10 , self.view.frame.size.width - 20, 40)];
    self.titles.textColor = [UIColor grayColor];
    self.titles.text = [NSString stringWithFormat:@"专辑名称:  %@",self.titlea];
    self.titles.font = [UIFont systemFontOfSize:15];
    [self.intr addSubview:self.titles];
    
    
    self.nicknames = [[UILabel alloc] initWithFrame:CGRectMake(10, 60, self.view.frame.size.width - 20, 40)];
//    self.nicknames.backgroundColor = [UIColor whiteColor];
    self.nicknames.font = [UIFont systemFontOfSize:15];
    self.nicknames.text = [NSString stringWithFormat:@"创建人:  %@",self.nickname];
    self.nicknames.textColor = [UIColor grayColor];
    [self.intr addSubview:self.nicknames];
    
    self.tagss = [[UILabel alloc] initWithFrame:CGRectMake(10, 110, self.view.frame.size.width - 20, 40)];
//    self.tagss.backgroundColor = [UIColor whiteColor];
    self.tagss.font = [UIFont systemFontOfSize:15];
    self.tagss.textColor = [UIColor grayColor];
    self.tagss.text = [NSString stringWithFormat:@"标签:  %@",self.tags];
    [self.intr addSubview:self.tagss];
    
    self.intros = [[UILabel alloc] initWithFrame:CGRectMake(10, 160, self.view.frame.size.width - 20, h)];
    [self.intros setNumberOfLines:0];
    [self.intros setFont:[UIFont systemFontOfSize:14]];
    self.intros.textAlignment = NSTextAlignmentLeft;
    NSString *str = [NSString stringWithFormat:@"简介:  %@",self.intro];
    NSString *string = [str stringByReplacingOccurrencesOfString:@"。" withString:@"。\n     "];
    self.intros.textColor = [UIColor grayColor];
    self.intros.text = string;
    [self.intr addSubview:self.intros];
}



- (void)leftButtonAction
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
